package com.aiju.common.image;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

/**
 * @author: 佐为
 * @date: 2017-03-06 10:38
 * @version: V1.0
 * @Description: 使用Glide库加载图片
 */
public class GlideImageLoad implements AiJuImageLoader {

    private Context mContext;

    @Override
    public void init(Context context) {
        this.mContext = context;
    }

    @Override
    public void displayImage(String imageUrl, ImageView imageView, int defaultImage) {
        Glide.with(mContext)
                .load(imageUrl)
                .placeholder(defaultImage)
                .into(imageView);
    }
}
